# fireball.gd
extends Area2D

@export var speed = 400
@export var direction = Vector2.RIGHT


func _physics_process(delta):
	position += direction * speed * delta

func _on_body_entered(body):
	if body.is_in_group("player"):
		return
	if body.is_in_group("enemy"):
		body.take_damage(1)
	queue_free()
